package com.aoxun.android.commons.util;
/**
 * Created by Onelong on 2017/11/20.
 */
import android.app.Activity;
import android.support.annotation.IdRes;
import android.view.View;



public class ViewUtil {

    public static <T extends View>  T getViewById(View view, @IdRes int id) {
        return (T) view.findViewById(id);
    }

    public static <T extends View> T getViewById(Activity activity, @IdRes int id) {
        return (T) activity.findViewById(id);
    }

}
